//
//  Search+Search.h
//  ClinicalCollections
//
//  Created by janakiraman gopinath on 1/21/13.
//  Copyright (c) 2013 GOPI. All rights reserved.
//

#import "Search.h"
#import "CommonAPI.h"
#import <CoreData/CoreData.h>

@interface Search (Search)

+ (UIManagedDocument *) openDatabase;

+ (NSURL *) getUrlForDatabase;

+ (NSArray *)fetchSearchStringWithSearchType:(NSString *) searchType
                    inManagedDocumentContext:(NSManagedObjectContext *) context;

+ (Search *)setSearchStringWithSearchType:(NSString *)searchType
                 inManagedDocumentContext:(NSManagedObjectContext *)context
                        usingSearchString:(NSString *) searchString
                                 recrType:(NSString *) recr;

+ (Search *)deleteSearchStringWithSearchType:(NSString *)searchType
                    inManagedDocumentContext:(NSManagedObjectContext *)context
                           usingSearchString:(NSString *) searchString;
+ (Search *) updateSearch:(Search *) search
 withLastAccessedDate:(NSDate *) lastAccessedDate
         usingContext:(NSManagedObjectContext *) context;

@end
